﻿using Avalon.Core.Data;
using Avalon.Core.MVC.Actions;
using Avalon.Core.MVC.Attributes;
using Avalon.Core.MVC.StateBags;
using System.Collections.Generic;

namespace Avalon.Core.MVC.Pipelines {

    [PipelineAttribute("GetAll")]
    public class GetAllPipeline<TModel> : BasePipeline where TModel : class, IEntity, new() {

        public GetAllPipeline() {
            PipelineActions.Add(new GetEntitiesAction<TModel>() { Index = 0 });
        }

        public override void InitializeStateBag() {
            this.StateBag = new CollectionBag<TModel>();
        }

    }
}
